!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[SearchBox]",["react","reactDOM"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[SearchBox]"]=t(require("react"),require("react-dom")):e["rb_wixui.thunderbolt[SearchBox]"]=t(e.React,e.ReactDOM)}("undefined"!=typeof self?self:this,(function(e,t){return function(){var n={5329:function(t){"use strict";t.exports=e},95561:function(e){"use strict";e.exports=t},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}g(32),g(l),g(u);const m="has-custom-focus",p=()=>"undefined"!=typeof window,f=e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{});const E="wixui-",T=(e,...t)=>{const n=[];return e&&n.push(`${E}${e}`),t.forEach((e=>{e&&(n.push(`${E}${e}`),n.push(e))})),n.join(" ")};var _={root:"search-bar",icon:"search-bar__icon",input:"search-bar__input"},I="HlRz5e";const L="v1",b=2,v=1920,C=1920,S=1e3,y=1e3,A={SCALE_TO_FILL:"fill",SCALE_TO_FIT:"fit",STRETCH:"stretch",ORIGINAL_SIZE:"original_size",TILE:"tile",TILE_HORIZONTAL:"tile_horizontal",TILE_VERTICAL:"tile_vertical",FIT_AND_TILE:"fit_and_tile",LEGACY_STRIP_TILE:"legacy_strip_tile",LEGACY_STRIP_TILE_HORIZONTAL:"legacy_strip_tile_horizontal",LEGACY_STRIP_TILE_VERTICAL:"legacy_strip_tile_vertical",LEGACY_STRIP_SCALE_TO_FILL:"legacy_strip_fill",LEGACY_STRIP_SCALE_TO_FIT:"legacy_strip_fit",LEGACY_STRIP_FIT_AND_TILE:"legacy_strip_fit_and_tile",LEGACY_STRIP_ORIGINAL_SIZE:"legacy_strip_original_size",LEGACY_ORIGINAL_SIZE:"actual_size",LEGACY_FIT_WIDTH:"fitWidth",LEGACY_FIT_HEIGHT:"fitHeight",LEGACY_FULL:"full",LEGACY_BG_FIT_AND_TILE:"legacy_tile",LEGACY_BG_FIT_AND_TILE_HORIZONTAL:"legacy_tile_horizontal",LEGACY_BG_FIT_AND_TILE_VERTICAL:"legacy_tile_vertical",LEGACY_BG_NORMAL:"legacy_normal"},w={FIT:"fit",FILL:"fill",FILL_FOCAL:"fill_focal",CROP:"crop",LEGACY_CROP:"legacy_crop",LEGACY_FILL:"legacy_fill"},O={CENTER:"center",TOP:"top",TOP_LEFT:"top_left",TOP_RIGHT:"top_right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom_left",BOTTOM_RIGHT:"bottom_right",LEFT:"left",RIGHT:"right"},M={[O.CENTER]:{x:.5,y:.5},[O.TOP_LEFT]:{x:0,y:0},[O.TOP_RIGHT]:{x:1,y:0},[O.TOP]:{x:.5,y:0},[O.BOTTOM_LEFT]:{x:0,y:1},[O.BOTTOM_RIGHT]:{x:1,y:1},[O.BOTTOM]:{x:.5,y:1},[O.RIGHT]:{x:1,y:.5},[O.LEFT]:{x:0,y:.5}},R={center:"c",top:"t",top_left:"tl",top_right:"tr",bottom:"b",bottom_left:"bl",bottom_right:"br",left:"l",right:"r"},N={BG:"bg",IMG:"img",SVG:"svg"},F={AUTO:"auto",CLASSIC:"classic",SUPER:"super"},x={classic:1,super:2},k={radius:"0.66",amount:"1.00",threshold:"0.01"},G={uri:"",css:{img:{},container:{}},attr:{img:{},container:{}},transformed:!1},P=25e6,B=[1.5,2,4],H={HIGH:{size:196e4,quality:90,maxUpscale:1},MEDIUM:{size:36e4,quality:85,maxUpscale:1},LOW:{size:16e4,quality:80,maxUpscale:1.2},TINY:{size:0,quality:80,maxUpscale:1.4}},V={HIGH:"HIGH",MEDIUM:"MEDIUM",LOW:"LOW",TINY:"TINY"},D={CONTRAST:"contrast",BRIGHTNESS:"brightness",SATURATION:"saturation",HUE:"hue",BLUR:"blur"},Y={JPG:"jpg",JPEG:"jpeg",JPE:"jpe",PNG:"png",WEBP:"webp",WIX_ICO_MP:"wix_ico_mp",WIX_MP:"wix_mp",GIF:"gif",SVG:"svg",AVIF:"avif",UNRECOGNIZED:"unrecognized"},U={AVIF:"AVIF",PAVIF:"PAVIF"};Y.JPG,Y.JPEG,Y.JPE,Y.PNG,Y.GIF,Y.WEBP;function $(e,...t){return function(...n){const i=n[n.length-1]||{},o=[e[0]];return t.forEach((function(t,a){const r=Number.isInteger(t)?n[t]:i[t];o.push(r,e[a+1])})),o.join("")}}function j(e){return e[e.length-1]}const q=[Y.PNG,Y.JPEG,Y.JPG,Y.JPE,Y.WIX_ICO_MP,Y.WIX_MP,Y.WEBP,Y.AVIF],z=[Y.JPEG,Y.JPG,Y.JPE];function Z(e,t,n){return n&&t&&!(!(i=t.id)||!i.trim()||"none"===i.toLowerCase())&&Object.values(A).includes(e);var i}function W(e,t,n){return function(e,t,n=!1){return!((X(e)||Q(e))&&t&&!n)}(e,t,n)&&(function(e){return q.includes(oe(e))}(e)||function(e,t=!1){return K(e)&&t}(e,n))&&!/(^https?)|(^data)|(^\/\/)/.test(e)}function J(e){return oe(e)===Y.PNG}function X(e){return oe(e)===Y.WEBP}function K(e){return oe(e)===Y.GIF}function Q(e){return oe(e)===Y.AVIF}const ee=["/","\\","?","<",">","|","\u201c",":",'"'].map(encodeURIComponent),te=["\\.","\\*"],ne="_";function ie(e){return function(e){return z.includes(oe(e))}(e)?Y.JPG:J(e)?Y.PNG:X(e)?Y.WEBP:K(e)?Y.GIF:Q(e)?Y.AVIF:Y.UNRECOGNIZED}function oe(e){return(/[.]([^.]+)$/.exec(e)&&/[.]([^.]+)$/.exec(e)[1]||"").toLowerCase()}function ae(e,t,n,i,o){let a;return a=o===w.FILL?function(e,t,n,i){return Math.max(n/e,i/t)}(e,t,n,i):o===w.FIT?function(e,t,n,i){return Math.min(n/e,i/t)}(e,t,n,i):1,a}function re(e,t,n,i,o,a){e=e||i.width,t=t||i.height;const{scaleFactor:r,width:s,height:c}=function(e,t,n,i,o){let a,r=n,s=i;if(a=ae(e,t,n,i,o),o===w.FIT&&(r=e*a,s=t*a),r&&s&&r*s>P){const n=Math.sqrt(P/(r*s));r*=n,s*=n,a=ae(e,t,r,s,o)}return{scaleFactor:a,width:r,height:s}}(e,t,i.width*o,i.height*o,n);return function(e,t,n,i,o,a,r){const{optimizedScaleFactor:s,upscaleMethodValue:c,forceUSM:l}=function(e,t,n,i){if("auto"===i)return function(e,t){const n=ue(e,t);return{optimizedScaleFactor:H[n].maxUpscale,upscaleMethodValue:x.classic,forceUSM:!1}}(e,t);if("super"===i)return function(e){return{optimizedScaleFactor:j(B),upscaleMethodValue:x.super,forceUSM:!(B.includes(e)||e>j(B))}}(n);return function(e,t){const n=ue(e,t);return{optimizedScaleFactor:H[n].maxUpscale,upscaleMethodValue:x.classic,forceUSM:!1}}(e,t)}(e,t,a,o);let u=n,d=i;if(a<=s)return{width:u,height:d,scaleFactor:a,upscaleMethodValue:c,forceUSM:l,cssUpscaleNeeded:!1};switch(r){case w.FILL:u=n*(s/a),d=i*(s/a);break;case w.FIT:u=e*s,d=t*s}return{width:u,height:d,scaleFactor:s,upscaleMethodValue:c,forceUSM:l,cssUpscaleNeeded:!0}}(e,t,s,c,a,r,n)}function se(e,t,n,i){const o=le(n)||function(e=O.CENTER){return M[e]}(i);return{x:Math.max(0,Math.min(e.width-t.width,o.x*e.width-t.width/2)),y:Math.max(0,Math.min(e.height-t.height,o.y*e.height-t.height/2)),width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}}function ce(e){return e.alignment&&R[e.alignment]||R[O.CENTER]}function le(e){let t;return!e||"number"!=typeof e.x||isNaN(e.x)||"number"!=typeof e.y||isNaN(e.y)||(t={x:de(Math.max(0,Math.min(100,e.x))/100,2),y:de(Math.max(0,Math.min(100,e.y))/100,2)}),t}function ue(e,t){const n=e*t;return n>H[V.HIGH].size?V.HIGH:n>H[V.MEDIUM].size?V.MEDIUM:n>H[V.LOW].size?V.LOW:V.TINY}function de(e,t){const n=Math.pow(10,t||0);return(e*n/n).toFixed(t)}function he(e){return e&&e.upscaleMethod&&F[e.upscaleMethod.toUpperCase()]||F.AUTO}function ge(e,t){const n=X(e)||Q(e);return oe(e)===Y.GIF||n&&t}const me={isMobile:!1},pe=function(e){return me[e]};function fe(){if("undefined"!=typeof window&&"undefined"!=typeof navigator){const t=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);e=t&&n,me["isMobile"]=e}var e}function Ee(e,t){const n={css:{container:{}}},{css:i}=n,{fittingType:o}=e;switch(o){case A.ORIGINAL_SIZE:case A.LEGACY_ORIGINAL_SIZE:case A.LEGACY_STRIP_ORIGINAL_SIZE:i.container.backgroundSize="auto",i.container.backgroundRepeat="no-repeat";break;case A.SCALE_TO_FIT:case A.LEGACY_STRIP_SCALE_TO_FIT:i.container.backgroundSize="contain",i.container.backgroundRepeat="no-repeat";break;case A.STRETCH:i.container.backgroundSize="100% 100%",i.container.backgroundRepeat="no-repeat";break;case A.SCALE_TO_FILL:case A.LEGACY_STRIP_SCALE_TO_FILL:i.container.backgroundSize="cover",i.container.backgroundRepeat="no-repeat";break;case A.TILE_HORIZONTAL:case A.LEGACY_STRIP_TILE_HORIZONTAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-x";break;case A.TILE_VERTICAL:case A.LEGACY_STRIP_TILE_VERTICAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-y";break;case A.TILE:case A.LEGACY_STRIP_TILE:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat";break;case A.LEGACY_STRIP_FIT_AND_TILE:i.container.backgroundSize="contain",i.container.backgroundRepeat="repeat";break;case A.FIT_AND_TILE:case A.LEGACY_BG_FIT_AND_TILE:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat";break;case A.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-x";break;case A.LEGACY_BG_FIT_AND_TILE_VERTICAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-y";break;case A.LEGACY_BG_NORMAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="no-repeat"}switch(t.alignment){case O.CENTER:i.container.backgroundPosition="center center";break;case O.LEFT:i.container.backgroundPosition="left center";break;case O.RIGHT:i.container.backgroundPosition="right center";break;case O.TOP:i.container.backgroundPosition="center top";break;case O.BOTTOM:i.container.backgroundPosition="center bottom";break;case O.TOP_RIGHT:i.container.backgroundPosition="right top";break;case O.TOP_LEFT:i.container.backgroundPosition="left top";break;case O.BOTTOM_RIGHT:i.container.backgroundPosition="right bottom";break;case O.BOTTOM_LEFT:i.container.backgroundPosition="left bottom"}return n}const Te={[O.CENTER]:"center",[O.TOP]:"top",[O.TOP_LEFT]:"top left",[O.TOP_RIGHT]:"top right",[O.BOTTOM]:"bottom",[O.BOTTOM_LEFT]:"bottom left",[O.BOTTOM_RIGHT]:"bottom right",[O.LEFT]:"left",[O.RIGHT]:"right"},_e={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ie(e,t){const n={css:{container:{},img:{}}},{css:i}=n,{fittingType:o}=e,a=t.alignment;switch(i.container.position="relative",o){case A.ORIGINAL_SIZE:case A.LEGACY_ORIGINAL_SIZE:e.parts&&e.parts.length?(i.img.width=e.parts[0].width,i.img.height=e.parts[0].height):(i.img.width=e.src.width,i.img.height=e.src.height);break;case A.SCALE_TO_FIT:case A.LEGACY_FIT_WIDTH:case A.LEGACY_FIT_HEIGHT:case A.LEGACY_FULL:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="contain",i.img.objectPosition=Te[a]||"unset";break;case A.LEGACY_BG_NORMAL:i.img.width="100%",i.img.height="100%",i.img.objectFit="none",i.img.objectPosition=Te[a]||"unset";break;case A.STRETCH:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="fill";break;case A.SCALE_TO_FILL:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="cover"}if("number"==typeof i.img.width&&"number"==typeof i.img.height&&(i.img.width!==t.width||i.img.height!==t.height)){const e=Math.round((t.height-i.img.height)/2),n=Math.round((t.width-i.img.width)/2);Object.assign(i.img,_e,function(e,t,n){return{[O.TOP_LEFT]:{top:0,left:0},[O.TOP_RIGHT]:{top:0,right:0},[O.TOP]:{top:0,left:t},[O.BOTTOM_LEFT]:{bottom:0,left:0},[O.BOTTOM_RIGHT]:{bottom:0,right:0},[O.BOTTOM]:{bottom:0,left:t},[O.RIGHT]:{top:e,right:0},[O.LEFT]:{top:e,left:0},[O.CENTER]:{width:n.width,height:n.height,objectFit:"none"}}}(e,n,t)[a])}return n}function Le(e,t){const n={css:{container:{}},attr:{container:{},img:{}}},{css:i,attr:o}=n,{fittingType:a}=e,r=t.alignment,{width:s,height:c}=e.src;let l;switch(i.container.position="relative",a){case A.ORIGINAL_SIZE:case A.LEGACY_ORIGINAL_SIZE:case A.TILE:e.parts&&e.parts.length?(o.img.width=e.parts[0].width,o.img.height=e.parts[0].height):(o.img.width=s,o.img.height=c),o.img.preserveAspectRatio="xMidYMid slice";break;case A.SCALE_TO_FIT:case A.LEGACY_FIT_WIDTH:case A.LEGACY_FIT_HEIGHT:case A.LEGACY_FULL:o.img.width="100%",o.img.height="100%",o.img.transform="",o.img.preserveAspectRatio="";break;case A.STRETCH:o.img.width=t.width,o.img.height=t.height,o.img.x=0,o.img.y=0,o.img.transform="",o.img.preserveAspectRatio="none";break;case A.SCALE_TO_FILL:W(e.src.id)?(o.img.width=t.width,o.img.height=t.height):(l=function(e,t,n,i,o){const a=ae(e,t,n,i,o);return{width:Math.round(e*a),height:Math.round(t*a)}}(s,c,t.width,t.height,w.FILL),o.img.width=l.width,o.img.height=l.height),o.img.x=0,o.img.y=0,o.img.transform="",o.img.preserveAspectRatio="xMidYMid slice"}if("number"==typeof o.img.width&&"number"==typeof o.img.height&&(o.img.width!==t.width||o.img.height!==t.height)){let e,n,i=0,s=0;a===A.TILE?(e=t.width%o.img.width,n=t.height%o.img.height):(e=t.width-o.img.width,n=t.height-o.img.height);const c=Math.round(e/2),l=Math.round(n/2);switch(r){case O.TOP_LEFT:i=0,s=0;break;case O.TOP:i=c,s=0;break;case O.TOP_RIGHT:i=e,s=0;break;case O.LEFT:i=0,s=l;break;case O.CENTER:i=c,s=l;break;case O.RIGHT:i=e,s=l;break;case O.BOTTOM_LEFT:i=0,s=n;break;case O.BOTTOM:i=c,s=n;break;case O.BOTTOM_RIGHT:i=e,s=n}o.img.x=i,o.img.y=s}return o.container.width=t.width,o.container.height=t.height,o.container.viewBox=[0,0,t.width,t.height].join(" "),n}function be(e,t,n){let i;switch(t.crop&&(i=function(e,t){const n=Math.max(0,Math.min(e.width,t.x+t.width)-Math.max(0,t.x)),i=Math.max(0,Math.min(e.height,t.y+t.height)-Math.max(0,t.y));return n&&i&&(e.width!==n||e.height!==i)?{x:Math.max(0,t.x),y:Math.max(0,t.y),width:n,height:i}:null}(t,t.crop),i&&(e.src.width=i.width,e.src.height=i.height,e.src.isCropped=!0,e.parts.push(Ce(i)))),e.fittingType){case A.SCALE_TO_FIT:case A.LEGACY_FIT_WIDTH:case A.LEGACY_FIT_HEIGHT:case A.LEGACY_FULL:case A.FIT_AND_TILE:case A.LEGACY_BG_FIT_AND_TILE:case A.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case A.LEGACY_BG_FIT_AND_TILE_VERTICAL:case A.LEGACY_BG_NORMAL:e.parts.push(ve(e,n));break;case A.SCALE_TO_FILL:e.parts.push(function(e,t){const n=re(e.src.width,e.src.height,w.FILL,t,e.devicePixelRatio,e.upscaleMethod),i=le(e.focalPoint);return{transformType:i?w.FILL_FOCAL:w.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:ce(t),focalPointX:i&&i.x,focalPointY:i&&i.y,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}(e,n));break;case A.STRETCH:e.parts.push(function(e,t){const n=ae(e.src.width,e.src.height,t.width,t.height,w.FILL),i={...t};return i.width=e.src.width*n,i.height=e.src.height*n,ve(e,i)}(e,n));break;case A.TILE_HORIZONTAL:case A.TILE_VERTICAL:case A.TILE:case A.LEGACY_ORIGINAL_SIZE:case A.ORIGINAL_SIZE:i=se(e.src,n,e.focalPoint,n.alignment),e.src.isCropped?(Object.assign(e.parts[0],i),e.src.width=i.width,e.src.height=i.height):e.parts.push(Ce(i));break;case A.LEGACY_STRIP_TILE_HORIZONTAL:case A.LEGACY_STRIP_TILE_VERTICAL:case A.LEGACY_STRIP_TILE:case A.LEGACY_STRIP_ORIGINAL_SIZE:e.parts.push(function(e){return{transformType:w.LEGACY_CROP,width:Math.round(e.width),height:Math.round(e.height),alignment:ce(e),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case A.LEGACY_STRIP_SCALE_TO_FIT:case A.LEGACY_STRIP_FIT_AND_TILE:e.parts.push(function(e){return{transformType:w.FIT,width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case A.LEGACY_STRIP_SCALE_TO_FILL:e.parts.push(function(e){return{transformType:w.LEGACY_FILL,width:Math.round(e.width),height:Math.round(e.height),alignment:ce(e),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n))}}function ve(e,t){const n=re(e.src.width,e.src.height,w.FIT,t,e.devicePixelRatio,e.upscaleMethod);return{transformType:!e.src.width||!e.src.height?w.FIT:w.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:R.center,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}function Ce(e){return{transformType:w.CROP,x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}function Se(e,t){t=t||{},e.quality=function(e,t){const n=e.fileType===Y.PNG,i=e.fileType===Y.JPG,o=e.fileType===Y.WEBP,a=e.fileType===Y.AVIF,r=i||n||o||a;if(r){const i=j(e.parts),o=(s=i.width,c=i.height,H[ue(s,c)].quality);let a=t.quality&&t.quality>=5&&t.quality<=90?t.quality:o;return a=n?a+5:a,a}var s,c;return 0}(e,t),e.progressive=function(e){return!1!==e.progressive}(t),e.watermark=function(e){return e.watermark}(t),e.autoEncode=t.autoEncode??!0,e.encoding=t?.encoding,e.unsharpMask=function(e,t){if(function(e){const t="number"==typeof(e=e||{}).radius&&!isNaN(e.radius)&&e.radius>=.1&&e.radius<=500,n="number"==typeof e.amount&&!isNaN(e.amount)&&e.amount>=0&&e.amount<=10,i="number"==typeof e.threshold&&!isNaN(e.threshold)&&e.threshold>=0&&e.threshold<=255;return t&&n&&i}(t.unsharpMask))return{radius:de(t.unsharpMask?.radius,2),amount:de(t.unsharpMask?.amount,2),threshold:de(t.unsharpMask?.threshold,2)};if(("number"!=typeof(n=(n=t.unsharpMask)||{}).radius||isNaN(n.radius)||0!==n.radius||"number"!=typeof n.amount||isNaN(n.amount)||0!==n.amount||"number"!=typeof n.threshold||isNaN(n.threshold)||0!==n.threshold)&&function(e){const t=j(e.parts);return!(t.scaleFactor>=1)||t.forceUSM||t.transformType===w.FIT}(e))return k;var n;return}(e,t),e.filters=function(e){const t=e.filters||{},n={};ye(t[D.CONTRAST],-100,100)&&(n[D.CONTRAST]=t[D.CONTRAST]);ye(t[D.BRIGHTNESS],-100,100)&&(n[D.BRIGHTNESS]=t[D.BRIGHTNESS]);ye(t[D.SATURATION],-100,100)&&(n[D.SATURATION]=t[D.SATURATION]);ye(t[D.HUE],-180,180)&&(n[D.HUE]=t[D.HUE]);ye(t[D.BLUR],0,100)&&(n[D.BLUR]=t[D.BLUR]);return n}(t)}function ye(e,t,n){return"number"==typeof e&&!isNaN(e)&&0!==e&&e>=t&&e<=n}function Ae(e,t,n,i){const o=function(e){return e?.isSEOBot??!1}(i),a=ie(t.id),r=function(e,t){const n=/\.([^.]*)$/,i=new RegExp(`(${ee.concat(te).join("|")})`,"g");if(t&&t.length){let e=t;const o=t.match(n);return o&&q.includes(o[1])&&(e=t.replace(n,"")),encodeURIComponent(e).replace(i,ne)}const o=e.match(/\/(.*?)$/);return(o?o[1]:e).replace(n,"")}(t.id,t.name),s=o?1:function(e){return Math.min(e.pixelAspectRatio||1,b)}(n),c=oe(t.id),l=c,u=W(t.id,i?.hasAnimation,i?.allowAnimatedTransform),d={fileName:r,fileExtension:c,fileType:a,fittingType:e,preferredExtension:l,src:{id:t.id,width:t.width,height:t.height,isCropped:!1,isAnimated:ge(t.id,i?.hasAnimation)},focalPoint:{x:t.focalPoint&&t.focalPoint.x,y:t.focalPoint&&t.focalPoint.y},parts:[],devicePixelRatio:s,quality:0,upscaleMethod:he(i),progressive:!0,watermark:"",unsharpMask:{},filters:{},transformed:u};return u&&(be(d,t,n),Se(d,i)),d}function we(e,t,n){const i={...n},o=pe("isMobile");switch(e){case A.LEGACY_BG_FIT_AND_TILE:case A.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case A.LEGACY_BG_FIT_AND_TILE_VERTICAL:case A.LEGACY_BG_NORMAL:const e=o?S:v,n=o?y:C;i.width=Math.min(e,t.width),i.height=Math.min(n,Math.round(i.width/(t.width/t.height))),i.pixelAspectRatio=1}return i}const Oe=$`fit/w_${"width"},h_${"height"}`,Me=$`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Re=$`fill/w_${"width"},h_${"height"},fp_${"focalPointX"}_${"focalPointY"}`,Ne=$`crop/x_${"x"},y_${"y"},w_${"width"},h_${"height"}`,Fe=$`crop/w_${"width"},h_${"height"},al_${"alignment"}`,xe=$`fill/w_${"width"},h_${"height"},al_${"alignment"}`,ke=$`,lg_${"upscaleMethodValue"}`,Ge=$`,q_${"quality"}`,Pe=$`,quality_auto`,Be=$`,usm_${"radius"}_${"amount"}_${"threshold"}`,He=$`,bl`,Ve=$`,wm_${"watermark"}`,De={[D.CONTRAST]:$`,con_${"contrast"}`,[D.BRIGHTNESS]:$`,br_${"brightness"}`,[D.SATURATION]:$`,sat_${"saturation"}`,[D.HUE]:$`,hue_${"hue"}`,[D.BLUR]:$`,blur_${"blur"}`},Ye=$`,enc_auto`,Ue=$`,enc_avif`,$e=$`,enc_pavif`,je=$`,pstr`;function qe(e,t,n,i={},o){if(W(t.id,i?.hasAnimation,i?.allowAnimatedTransform)){if(X(t.id)||Q(t.id)){const{alignment:a,...r}=n;t.focalPoint={x:void 0,y:void 0},delete t?.crop,o=Ae(e,t,r,i)}else o=o||Ae(e,t,n,i);return function(e){const t=[];e.parts.forEach((e=>{switch(e.transformType){case w.CROP:t.push(Ne(e));break;case w.LEGACY_CROP:t.push(Fe(e));break;case w.LEGACY_FILL:let n=xe(e);e.upscale&&(n+=ke(e)),t.push(n);break;case w.FIT:let i=Oe(e);e.upscale&&(i+=ke(e)),t.push(i);break;case w.FILL:let o=Me(e);e.upscale&&(o+=ke(e)),t.push(o);break;case w.FILL_FOCAL:let a=Re(e);e.upscale&&(a+=ke(e)),t.push(a)}}));let n=t.join("/");return e.quality&&(n+=Ge(e)),e.unsharpMask&&(n+=Be(e.unsharpMask)),e.progressive||(n+=He(e)),e.watermark&&(n+=Ve(e)),e.filters&&(n+=Object.keys(e.filters).map((t=>De[t](e.filters))).join("")),e.fileType!==Y.GIF&&(e.encoding===U.AVIF?(n+=Ue(e),n+=Pe(e)):e.encoding===U.PAVIF?(n+=$e(e),n+=Pe(e)):e.autoEncode&&(n+=Ye(e))),e.src?.isAnimated&&e.transformed&&(n+=je(e)),`${e.src.id}/${L}/${n}/${e.fileName}.${e.preferredExtension}`}(o)}return t.id}const ze={[O.CENTER]:"50% 50%",[O.TOP_LEFT]:"0% 0%",[O.TOP_RIGHT]:"100% 0%",[O.TOP]:"50% 0%",[O.BOTTOM_LEFT]:"0% 100%",[O.BOTTOM_RIGHT]:"100% 100%",[O.BOTTOM]:"50% 100%",[O.RIGHT]:"100% 50%",[O.LEFT]:"0% 50%"},Ze=Object.entries(ze).reduce(((e,[t,n])=>(e[n]=t,e)),{}),We=[A.TILE,A.TILE_HORIZONTAL,A.TILE_VERTICAL,A.LEGACY_BG_FIT_AND_TILE,A.LEGACY_BG_FIT_AND_TILE_HORIZONTAL,A.LEGACY_BG_FIT_AND_TILE_VERTICAL],Je=[A.LEGACY_ORIGINAL_SIZE,A.ORIGINAL_SIZE,A.LEGACY_BG_NORMAL];function Xe(e,t,{width:n,height:i}){return e===A.TILE&&t.width>n&&t.height>i}function Ke(e,{width:t,height:n}){if(!t||!n){const i=t||Math.min(980,e.width),o=i/e.width;return{width:i,height:n||e.height*o}}return{width:t,height:n}}function Qe(e,t,n,i="center"){const o={img:{},container:{}};if(e===A.SCALE_TO_FILL){const e=t.focalPoint&&function(e){const t=`${e.x}% ${e.y}%`;return Ze[t]||""}(t.focalPoint),a=e||i;t.focalPoint&&!e?o.img={objectPosition:et(t,n,t.focalPoint)}:o.img={objectPosition:ze[a]}}else[A.LEGACY_ORIGINAL_SIZE,A.ORIGINAL_SIZE].includes(e)?o.img={objectFit:"none",top:"auto",left:"auto",right:"auto",bottom:"auto"}:We.includes(e)&&(o.container={backgroundSize:`${t.width}px ${t.height}px`});return o}function et(e,t,n){const{width:i,height:o}=e,{width:a,height:r}=t,{x:s,y:c}=n;if(!a||!r)return`${s}% ${c}%`;const l=Math.max(a/i,r/o),u=i*l,d=o*l,h=Math.max(0,Math.min(u-a,u*(s/100)-a/2)),g=Math.max(0,Math.min(d-r,d*(c/100)-r/2));return`${h&&Math.floor(h/(u-a)*100)}% ${g&&Math.floor(g/(d-r)*100)}%`}const tt={width:"100%",height:"100%"};function nt(e,t,n,i={}){const{autoEncode:o=!0,isSEOBot:a,shouldLoadHQImage:r,hasAnimation:s,allowAnimatedTransform:c,encoding:l}=i;if(!Z(e,t,n))return G;const u=void 0===c||c,d=W(t.id,s,u);if(!d||r)return it(e,t,n,{...i,autoEncode:o,useSrcset:d});const h={...n,...Ke(t,n)},{alignment:g,htmlTag:m}=h,p=Xe(e,t,h),f=function(e,t,{width:n,height:i},o=!1){if(o)return{width:n,height:i};const a=!Je.includes(e),r=Xe(e,t,{width:n,height:i}),s=!r&&We.includes(e),c=s?t.width:n,l=s?t.height:i,u=a?function(e,t){return e>900?t?.05:.15:e>500?t?.1:.18:e>200?.25:1}(c,J(t.id)):1;return{width:r?1920:c*u,height:l*u}}(e,t,h,a),E=function(e,t,n){return n?0:We.includes(t)?1:e>200?2:3}(h.width,e,a),T=function(e,t){const n=We.includes(e)&&!t;return e===A.SCALE_TO_FILL||n?A.SCALE_TO_FIT:e}(e,p),_=Qe(e,t,n,g),{uri:I}=it(T,t,{...f,alignment:g,htmlTag:m},{autoEncode:o,filters:E?{blur:E}:{},hasAnimation:s,allowAnimatedTransform:u,encoding:l}),{attr:L={},css:b}=it(e,t,{...h,alignment:g,htmlTag:m},{});return b.img=b.img||{},b.container=b.container||{},Object.assign(b.img,_.img,tt),Object.assign(b.container,_.container),{uri:I,css:b,attr:L,transformed:!0}}function it(e,t,n,i){let o={};if(Z(e,t,n)){const a=we(e,t,n),r=Ae(e,t,a,i);o.uri=qe(e,t,a,i,r),i?.useSrcset&&(o.srcset=function(e,t,n,i,o){const a=n.pixelAspectRatio||1;return{dpr:[`${1===a?o.uri:qe(e,t,{...n,pixelAspectRatio:1},i)} 1x`,`${2===a?o.uri:qe(e,t,{...n,pixelAspectRatio:2},i)} 2x`]}}(e,t,a,i,o)),Object.assign(o,function(e,t){let n;return n=t.htmlTag===N.BG?Ee:t.htmlTag===N.SVG?Le:Ie,n(e,t)}(r,a),{transformed:r.transformed})}else o=G;return o}const ot="https://static.wixstatic.com/media/";"undefined"!=typeof window&&window.devicePixelRatio;fe();fe();const at=ot,{STATIC_MEDIA_URL:rt}=e,st=({fittingType:e,src:t,target:n,options:i})=>{const o=nt(e,t,n,{...i,autoEncode:!0});return o?.uri&&!/^[a-z]+:/.test(o.uri)&&(o.uri=`${rt}${o.uri}`),o},ct=/^[a-z]+:/,lt=e=>{const{id:t,containerId:n,uri:o,alt:a,name:r="",role:s,width:c,height:l,displayMode:u,devicePixelRatio:d,quality:h,alignType:g,bgEffectName:m="",focalPoint:p,upscaleMethod:f,className:E="",crop:T,imageStyles:_={},targetWidth:L,targetHeight:b,targetScale:v,onLoad:C=(()=>{}),onError:S=(()=>{}),shouldUseLQIP:y,containerWidth:A,containerHeight:w,getPlaceholder:O,isInFirstFold:M,placeholderTransition:R,socialAttrs:N,isSEOBot:F,skipMeasure:x,hasAnimation:k,encoding:G}=e,P=i.useRef(null);let B="";const H="blur"===R,V=i.useRef(null);if(!V.current)if(O||y||M||F){const e={upscaleMethod:f,...h||{},shouldLoadHQImage:M,isSEOBot:F,hasAnimation:k,encoding:G};V.current=(O||st)({fittingType:u,src:{id:o,width:c,height:l,crop:T,name:r,focalPoint:p},target:{width:A,height:w,alignment:g,htmlTag:"img"},options:e}),B=!V.current.transformed||M||F?"":"true"}else V.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const D=!F&&(O||y)&&!M&&V.current.transformed,Y=i.useMemo((()=>JSON.stringify({containerId:n,...n&&{containerId:n},...g&&{alignType:g},...x&&{skipMeasure:!0},displayMode:u,...A&&{targetWidth:A},...w&&{targetHeight:w},...L&&{targetWidth:L},...b&&{targetHeight:b},...v&&{targetScale:v},isLQIP:D,isSEOBot:F,lqipTransition:R,encoding:G,imageData:{width:c,height:l,uri:o,name:r,displayMode:u,hasAnimation:k,...h&&{quality:h},...d&&{devicePixelRatio:d},...p&&{focalPoint:p},...T&&{crop:T},...f&&{upscaleMethod:f}}})),[n,g,x,u,A,w,L,b,v,D,F,R,G,c,l,o,r,k,h,d,p,T,f]),U=V.current,$=U?.uri,j=U?.srcset,q=U.css?.img,z=`${I} ${E}`;i.useEffect((()=>{const e=P.current;C&&e?.currentSrc&&e?.complete&&C({target:e})}),[]);const Z=U&&!U?.transformed?`max(${c}px, 100%)`:L?`${L}px`:null;return i.createElement("wow-image",{id:t,class:z,"data-image-info":Y,"data-motion-part":`BG_IMG ${n}`,"data-bg-effect-name":m,"data-has-ssr-src":B,"data-animate-blur":!F&&D&&H?"":void 0,style:Z?{"--wix-img-max-width":Z}:{}},i.createElement("img",{src:$,ref:P,alt:a||"",role:s,style:{...q,..._},onLoad:C,onError:S,width:A||void 0,height:w||void 0,...N,srcSet:M?j?.dpr?.map((e=>ct.test(e)?e:`${rt}${e}`)).join(", "):void 0,fetchpriority:M?"high":void 0,loading:!1===M?"lazy":void 0,suppressHydrationWarning:!0}))};var ut="I5zqsT";var dt=e=>{var t,o;const{id:a,alt:r,role:s,className:l,imageStyles:u={},targetWidth:d,targetHeight:h,onLoad:g,onError:m,containerWidth:p,containerHeight:f,isInFirstFold:E,socialAttrs:T,skipMeasure:_,responsiveImageProps:I,zoomedImageResponsiveOverride:L}=e,b=d||p,v=h||f,C=b+"px",{fallbackSrc:S,srcset:y,css:A}=I||{};return S&&y&&A?i.createElement("img",n()({fetchpriority:E?"high":void 0,loading:!1===E?"lazy":void 0,sizes:C,srcSet:_?null==L?void 0:L.srcset:null==I?void 0:I.srcset,id:a,src:S,alt:r||"",role:s,style:{...u,..._?{...null==L||null==(t=L.css)?void 0:t.img}:{...null==I||null==(o=I.css)?void 0:o.img}},onLoad:g,onError:m,className:c(l,ut),width:b,height:v},T)):i.createElement(lt,e)};let ht=function(e){return e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Empty=2]="Empty",e[e.Hidden=3]="Hidden",e}({});function gt(e){const[t,n]=(0,i.useState)((o=e.image)?o.name?p()?ht.Loading:ht.Loaded:ht.Empty:ht.Hidden);var o;return{onError:()=>n(ht.Empty),onLoad:()=>n(ht.Loaded),thumbnailState:t}}var mt="U603xX",pt="FedNkl",ft="Z3eRZ6",Et="UXNCo3",Tt="D_fVyl",_t="CA8K4D",It="zQjJyB";const Lt=e=>{var t,n,i;let{action:o,id:a,item:s}=e;const{thumbnailState:l,onError:u,onLoad:d}=gt(s),h="fit"===(null==(t=s.image)?void 0:t.resizeMode)?"fit":"fill";return r().createElement("div",{className:mt,title:s.title,onClick:()=>o(),"data-testid":"suggestion-item-action"},l!==ht.Hidden&&r().createElement("div",{className:c(ft,{[Et]:l===ht.Empty,[Tt]:l===ht.Loading}),"data-testid":"thumbnail"},l!==ht.Empty&&r().createElement(dt,{alt:s.title,containerId:a,displayMode:h,height:(null==(n=s.image)?void 0:n.height)||55,id:"thumb-"+a,name:s.title,onError:u,onLoad:d,uri:s.image.name,width:(null==(i=s.image)?void 0:i.width)||73})),r().createElement("div",{className:pt},r().createElement("span",{className:_t,dangerouslySetInnerHTML:{__html:s.title}}),s.description&&r().createElement("p",{className:It,dangerouslySetInnerHTML:{__html:s.description}})))};var bt="u6Qhf2",vt="Nn5HXB";const Ct=e=>{let{item:t}=e;return i.createElement("div",{className:bt},i.createElement("div",{className:vt},i.createElement("span",null,t.title)))};var St="k6cep8",yt="Zg1VXg",At="q0F5lM";const wt=e=>{let{scrollIntoRef:t,suggestions:n}=e;return i.createElement("div",{className:c(St,{[yt]:!(null!=n&&n.footer)}),role:"listbox"},null==n?void 0:n.items.map((e=>{let{action:n,id:o,isActive:a,item:r,testId:s,type:l}=e;return i.createElement("div",{"aria-selected":a,className:c({[At]:!!r.url}),"data-testid":s,key:o,ref:a?t:void 0,role:"option"},"item"===l?i.createElement(Lt,{action:n,id:o,item:r}):i.createElement(Ct,{action:n,id:o,item:r}))})))};var Ot;function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{children:t,onClick:n}=e;return i.createElement("div",{className:Ft},i.createElement("button",{className:xt,role:"link","data-testid":"suggestions-show-all-button",onClick:n},t))};var Gt="g3as8r",Pt="TrbL5O",Bt="h0H1OP";const Ht=e=>{let{id:t,onSuggestionsFooterClick:n,query:o,translations:a,useModalSuggestions:r}=e;const s=a.footerSearchAllText+' "'+o+'"',c=()=>{null==n||n({type:"suggestionsFooterClick",compId:t})};return r?i.createElement(kt,{onClick:c},s):i.createElement("button",{className:Gt,role:"link","data-testid":"footer-link",onClick:c},i.createElement(Rt,{className:Pt}),i.createElement("span",{className:Bt},s))};var Vt="_xpJkc",Dt="JK71Yc",Yt="oRg3Ie",Ut="UaSQpI";const $t=e=>{(e=>{let{callback:t,ref:n,elem:o}=e;(0,i.useEffect)((()=>{const e=new ResizeObserver(t);return null!=n&&n.current&&e.observe(n.current),o&&e.observe(o),()=>{e.disconnect()}}),[n,o,t])})({callback:(0,i.useCallback)((()=>{var t,n;const i=null==e||null==(t=e.current)?void 0:t.clientHeight;null==e||null==(n=e.current)||n.style.setProperty("--component-height",i+"px")}),[e]),ref:e})},jt=e=>{let{id:t,children:n,parentRef:o,isSuggestionsShown:a,onSuggestionsFooterClick:r,query:s,scrollIntoRef:l,suggestions:u,translations:d,useModalSuggestions:h}=e;return $t(o),i.createElement("div",{className:c(Vt,{[Dt]:a})},i.createElement("div",{className:Yt},n),a&&i.createElement("div",{className:Ut,"aria-hidden":"true"},i.createElement(wt,{scrollIntoRef:l,suggestions:u}),(null==u?void 0:u.footer)&&i.createElement(Ht,{id:t,onSuggestionsFooterClick:r,query:s,translations:d,useModalSuggestions:h})))};function qt(e,t){const{id:n,value:o,onSuggestionGroupSelect:a,onSuggestionSelect:r,suggestions:s}=e,[c,l]=i.useState(-1),u=i.useRef(null);i.useEffect((()=>{u.current&&(null==u.current.scrollIntoView||u.current.scrollIntoView(!1))}),[c]),i.useEffect((()=>{t||l(-1)}),[t]),i.useEffect((()=>{l(-1)}),[o]);const d=i.useMemo((()=>function(e,t){let{id:n,suggestions:i,onSuggestionGroupSelect:o,onSuggestionSelect:a}=e;return null!=i&&i.items?{...i,items:i.items.map(((e,i)=>{const r=e.type,s=[Nt,i],c=s.join("");return"image"in e&&e.image&&s.push(e.image.name),{action:()=>{const t={compId:n,syntheticEvent:e};"group"===r?null==o||o({type:"suggestionGroupSelect",...t}):null==a||a({type:"suggestionSelect",...t})},id:s.join("_"),isActive:i===t,item:{...e,url:"group"===r?void 0:e.url},testId:c,type:r}}))}:{...i,items:[]}}({id:n,onSuggestionGroupSelect:a,onSuggestionSelect:r,suggestions:s},c)),[c,n,a,r,s]),h=d.items.filter((e=>e.item.url)),g=h.length,m=h.findIndex((e=>{var t;return e.id===(null==(t=d.items[c])?void 0:t.id)}));return{moveDown:()=>{const e=m{var n;return t.id===(null==(n=h[e])?void 0:n.id)})))},moveUp:()=>{const e=m>0?m-1:g-1;l(d.items.findIndex((t=>{var n;return t.id===(null==(n=h[e])?void 0:n.id)})))},navigate:()=>{try{var e;null==d||null==(e=d.items)||e[c].action()}catch(e){console.error("Error while navigating",e)}},scrollIntoRef:u,activeOptionIndex:c,suggestionsWithNavigation:d}}const zt=function(e,t,n,o){void 0===o&&(o=!0),(0,i.useEffect)((()=>{const i=e=>{const i=e.target;if(i){for(const e of t){var o;if(e instanceof HTMLElement){if(e&&e.contains(i))return}else if(null!=e&&null!=(o=e.current)&&o.contains(i))return}n()}};return document.addEventListener(e,i,o),()=>{document.removeEventListener(e,i,o)}}),[...t,n,e])};var Zt,Wt=o(95561);function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{direction:t,onClick:n}=e;return i.createElement("div",{className:Kt,"data-testid":"modalSearchSuggestionsCloseButton",onClick:n},i.createElement(Xt,{className:c(Qt,{[en]:"rtl"===t})}))};var nn="fuYJV8",on="q4fpr5",an="WRjDFM";const rn=()=>i.createElement("div",{className:nn,"data-testid":"suggestions-loader"},i.createElement("svg",{viewBox:"0 0 50 50",className:on},i.createElement("circle",{className:an,cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"2"})));var sn="RlO8U_",cn="Q2YYMa",ln="oEUJj7",un="TaFPqR";const dn=e=>{let{children:t,clearValue:n,closeSuggestions:o,direction:a,id:r,inputRef:s,onSuggestionsFooterClick:c,query:l,scrollIntoRef:u,suggestions:d,suggestionsLoading:h,translations:g,scopedClassName:m}=e;const[p,f]=i.useState();i.useEffect((()=>{const e=document.createElement("div");return document.body.appendChild(e),m&&e.classList.add(m),f(e),()=>{document.body.removeChild(e)}}),[m]);return i.useEffect((()=>{setTimeout((()=>{var e;null==(e=s.current)||e.focus()}),400)}),[]),p?(0,Wt.createPortal)(i.createElement("div",{dir:a,className:sn,"data-testid":"modalSearchSuggestions",role:"dialog"},i.createElement("div",{className:cn},i.createElement(tn,{direction:a,onClick:()=>{o(),n()}}),i.createElement("div",{className:ln},t)),i.createElement("div",{className:un,onScroll:()=>{var e;null==(e=s.current)||e.blur()}},i.createElement(wt,{scrollIntoRef:u,suggestions:d}),(null==d?void 0:d.footer)&&i.createElement(Ht,{id:r,onSuggestionsFooterClick:c,query:l,translations:g,useModalSuggestions:!0}),h&&i.createElement(rn,null))),p):null},hn=({size:e,...t})=>i.createElement("svg",{viewBox:"0 0 20 20",fill:"currentColor",width:e||"20",height:e||"20",...t},i.createElement("path",{fillRule:"evenodd",d:"M9.5,3 C13.084,3 16,5.916 16,9.5 C16,13.084 13.084,16 9.5,16 C5.916,16 3,13.084 3,9.5 C3,5.916 5.916,3 9.5,3 Z M9.5,4 C6.467,4 4,6.467 4,9.5 C4,12.533 6.467,15 9.5,15 C12.533,15 15,12.533 15,9.5 C15,6.467 12.533,4 9.5,4 Z M10,11 L10,12 L9,12 L9,11 L10,11 Z M10,7 L10,10 L9,10 L9,7 L10,7 Z"}));hn.displayName="ErrorSmall";var gn=hn,mn="TLWrjM",pn="GIPQqH",fn="JNgJbf";const En=e=>{let{errorMessage:t,errorMessageType:n,shouldShowValidityIndication:o,translations:a,dataHook:r,componentViewMode:s}=e;const c="editor"===s?(null==a?void 0:a.errorMessage)||"Error text displays here.":t;return"inline"===n&&o&&c?i.createElement("div",{"data-hook":r||"inline-error-message",className:mn},i.createElement(gn,{className:pn}),i.createElement("span",{className:fn},c)):null};var Tn={root:"text-input",inputEl:"text-input__input",inputLabel:"text-input__label"},_n={input:"KvoMHf",hideNumberSpinner:"ErucfC",AppsTextInputSkin:"MpKiNN",appsTextInputSkin:"MpKiNN",inputWrapper:"pUnTVX",prefix:"eXvLsN","validation-indication":"LyB02C",validationIndication:"LyB02C",label:"wPeA6j",hasLabel:"qzvPmW","required-indication":"lPl_oN",requiredIndication:"lPl_oN",ResponsiveTextInputSkin:"ZXdXNL",responsiveTextInputSkin:"ZXdXNL"};const In="Please enter a phone number with {digits} digits",Ln="Please enter between 4 to 17 digits. You can include hyphens (-) or start with a (+), e.g., 555-123-4567 or +(222)987654321",bn="Please enter between 4 to 17 digits. You can include dividers (-), e.g., 555-123-4567.",vn=function(e,t,n){void 0===n&&(n=!0);return Array.from(t).reduce(((e,t,n)=>"-"===t?[...e,n]:e),[]).filter(((t,i)=>n?t<=e.length:t<=e.length+i))},Cn=(e,t)=>t.replace("{digits}",""+(e?e.replace(/-/g,"").length:0)),Sn=()=>{},yn=(e,t)=>{var o;const{skin:a,name:r,id:s,className:l="",customClassNames:u=[],dataTestId:d,value:h,inputType:g="text",label:p,placeholder:E,readOnly:_,required:I,isDisabled:L,pattern:b,autoComplete:v,autoComplete_:C,maxLength:S,min:y,max:A,step:w,numberSpinnerHidden:O,shouldShowValidityIndication:M,isValid:R,autoFocus:N,prefix:F,phoneFormat:x="",errorMessageType:k="tooltip",validateValue:G=Sn,setValidityIndication:P=Sn,onBlur:B=Sn,onFocus:H=Sn,onKeyPress:V=Sn,onInput:D=Sn,onValueChange:Y=Sn,onChange:U=Sn,onClick:$=Sn,onDblClick:j=Sn,onMouseEnter:q=Sn,onMouseLeave:z=Sn,onHydrationComplete:Z=Sn,ariaAttributes:W,contentRef:J,translations:X,componentViewMode:K,textInputAutoFillFixEnabled:Q}=e,ee=i.useRef(null),[te,ne]=i.useState(!0);i.useImperativeHandle(t,(()=>({focus:()=>{var e;null==(e=ee.current)||e.focus()},blur:()=>{var e;null==(e=ee.current)||e.blur()},setCustomValidity:t=>{var n,i;"message"===t.type?null==(n=ee.current)||n.setCustomValidity(t.message):null==(i=ee.current)||i.setCustomValidity(((e,t)=>{let{translations:n,phoneFormat:i}=t;switch(e.key){case"PHONE_FORMAT_LENGTH_VALIDATION_ERROR":return Cn(i,(null==n?void 0:n.phoneFormatLengthValidationError)||In);case"PHONE_FORMAT_DEFAULT_VALIDATION_ERROR":return(null==n?void 0:n.phoneFormatDefaultValidationError)||Ln;case"PHONE_FORMAT_COMPLEX_PHONE_DEFAULT_VALIDATION_ERROR":return(null==n?void 0:n.phoneFormatComplexPhoneDefaultValidationError)||bn;default:return e.key}})(t,{translations:e.translations,phoneFormat:e.phoneFormat}))},getValidationMessage:()=>{var e;return null==(e=ee.current)?void 0:e.validationMessage}})));const ie=i.useRef(),oe=i.useMemo((()=>"tel"===g&&x?((e,t)=>{const n=vn(e,t,!1),i=Array.from(e);return n.forEach((e=>{e{let{shouldHideValidityIndication:t,shouldCallOnInput:n}=e;return e=>{const{value:i}=e.target;let o=i;if(x){const e=i.length{const i=vn(e,t);return i.reduce(((t,o,a)=>{if(" "===e[o])t.splice(o-a,1);else if(" "!==e[o+1]||n)" "===e[o-1]&&n&&(e.split(" ").length-1{Q&&!le()&&U({...e,type:"change"})})(e),G()),t&&P(!1),n&&D(e)}};i.useEffect((()=>{var e,t;ae({shouldHideValidityIndication:!0,shouldCallOnInput:!1})({target:{value:null!=(e=null==(t=ee.current)?void 0:t.value)?e:""}}),Z({type:"onHydrationComplete"})}),[]);const re=c(_n[a],l,T(Tn.root,...u),{[_n.hasLabel]:!!p,[_n.requiredIndication]:I,[_n.validationIndication]:!!M}),{"aria-label":se,...ce}=(({role:e,tabIndex:t,tabindex:n,...i}={})=>{const o=Object.entries(i).reduce(((e,[t,n])=>({...e,[`aria-${t}`.toLowerCase()]:n})),{role:e,tabIndex:t??n});return Object.keys(o).forEach((e=>{void 0!==o[e]&&null!==o[e]||delete o[e]})),o})(W),le=()=>!!ee.current&&ee.current===document.activeElement;return i.createElement("div",n()({id:s},f(e),{ref:J,className:re,"data-testid":d,onClick:e=>{L||$(e)},onDoubleClick:e=>{L||j(e)},onMouseEnter:e=>{L||q(e)},onMouseLeave:e=>{L||z(e)}}),!!p&&i.createElement("label",{htmlFor:"input_"+s,className:c(_n.label,T(Tn.inputLabel))},p),i.createElement("div",{className:_n.inputWrapper},F&&i.createElement("div",{className:_n.prefix},F),i.createElement("input",n()({name:r,ref:ee,id:"input_"+s,className:c(_n.input,m,T(Tn.inputEl),{[_n.hideNumberSpinner]:O}),type:g,value:oe,onFocus:H,onKeyDown:V,onChange:ae({shouldHideValidityIndication:!0,shouldCallOnInput:!0}),onBlur:e=>{B(e),ie.current&&U({...e,type:"change"}),ie.current=!1,P(!0),te&&ne(!1)},placeholder:E,readOnly:_,required:I,"aria-required":I,"aria-invalid":(()=>{var e;if(!1===R)return!0;const t=!(null!=(e=ee.current)&&e.validity.valid);return!te&&t})(),pattern:b,maxLength:(()=>{let e=null===S?void 0:S;return x&&(e=x.length),e})(),minLength:x?x.length:void 0,disabled:L,autoComplete:v?"on":C||"off",step:null===w?void 0:w,min:null===y?void 0:y,max:null===A?void 0:A,autoFocus:N,"aria-label":se||p?se:E},ce))),i.createElement(En,{errorMessageType:k,errorMessage:null==(o=ee.current)?void 0:o.validationMessage,shouldShowValidityIndication:M,translations:X,componentViewMode:K}))};var An=i.forwardRef(yn);const wn={left:"onSwipeLeft",right:"onSwipeRight",up:"onSwipeUp",down:"onSwipeDown"},On=e=>{if(e.touches&&e.touches.length){const t=e.touches[0];return{x:t.pageX,y:t.pageY}}},Mn={touched:!0,moved:!1,deltaCoords:{x:0,y:0}},Rn=(e,t,n)=>()=>{let i;const o=e=>{i={...Mn,numOfTouches:e.touches.length,startCoords:On(e),startTime:Date.now(),evObj:{...e}}},a=e=>{if(!i)return;const t=On(e);if(t){i.startCoords||(i.startCoords=t);const e=i.startCoords.x-t.x,n=i.startCoords.y-t.y;i.moved=!0,i.deltaCoords={x:e,y:n}}},r=()=>{if(i)if(i.endTime=Date.now(),"onTap"===e&&(e=>e.touched&&!e.moved&&1===e.numOfTouches)(i))t(i.evObj);else if((e=>e.moved&&1===e.numOfTouches&&e.endTime-e.startTime<500&&(Math.abs(e.deltaCoords.x)>100||Math.abs(e.deltaCoords.y)>60))(i)){const n=((e,t)=>{let n;return n=Math.abs(e)>Math.abs(t)?e>0?"left":"right":t>0?"up":"down",n})(i.deltaCoords.x,i.deltaCoords.y);e===wn[n]&&t(i.evObj)}};return n&&n.current&&(n.current.addEventListener("touchstart",o,{passive:!0}),n.current.addEventListener("touchmove",a,{passive:!0}),n.current.addEventListener("touchend",r,{passive:!0})),()=>{n&&n.current&&(n.current.removeEventListener("touchstart",o),n.current.removeEventListener("touchmove",a),n.current.removeEventListener("touchend",r))}};var Nn;function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onClick:t,label:n,clearButtonText:o}=e;return i.createElement("button",{"aria-label":n,className:kn,"data-testid":"clear-button",onClick:t,type:"button"},i.createElement(xn,null),i.createElement("span",{className:Gn},o))};var Bn="nNn3mc",Hn="LIyiar",Vn="fkomZa",Dn="LYhw1A",Yn="FwtNU8";const Un={autoComplete_:"off",autoComplete:!1,required:!1,shouldShowValidityIndication:!1,skin:"ResponsiveTextInputSkin",validateValueAndShowIndication:()=>{}},$n=e=>{let{autocompleteValue:t,changeValue:o,clearButtonLabel:a,clearValue:s,containerRef:l,id:u,inputRef:d,isDisabled:h,onAutocomplete:g,onBlur:m,onChange:p,onClick:f,onDblClick:E,onFocus:I,onKeyPress:L,placeholder:b,value:v,isModalSuggestionsShown:C,clearButtonText:S}=e;const y=Boolean(v),A=(0,i.useCallback)((e=>{e!==v&&(o(e),null==p||p({type:"change",compId:u,previousValue:v}))}),[u,o,p,v]);(0,i.useEffect)((()=>{const e=document.activeElement;e&&e.id.includes(u)&&!C&&e.dispatchEvent(new FocusEvent("focus"))}),[]);const[w,O,M,R]=(e=>{let{autocompleteValue:t,id:n,onAutocomplete:o,onChange:a,value:r}=e;const[s,c]=(0,i.useState)(!0),l=(0,i.useMemo)((()=>{if(!t||!s)return"";const e=r.toLocaleLowerCase().trimStart();if(!e)return"";const n=t.toLocaleLowerCase();if(!n.startsWith(e)||n===e)return"";const i=t.substr(e.length);return""+r+i}),[t,r,s]),u=(0,i.useCallback)((()=>{a(l),null==o||o({type:"autocomplete",compId:n,previousValue:r})}),[n,l,a,o,r]),d=(0,i.useCallback)((e=>{if(!l)return;const{key:t,currentTarget:n}=e,{selectionStart:i,selectionEnd:o}=n;if("Tab"===t)e.preventDefault(),e.stopPropagation();else if("ArrowRight"!==t||i!==o||i!==r.length)return;u()}),[l,r,u]),h=(0,i.useCallback)((()=>{l&&u()}),[l,u]);return[l,d,e=>{const{scrollLeft:t,scrollWidth:n,clientWidth:i}=e.currentTarget;c(0===t&&n<=i)},h]})({autocompleteValue:t,id:u,onAutocomplete:g,onChange:A,value:v});var N,F,x;return N="onSwipeRight",F=R,x=l,i.useEffect(Rn(N,F,x),[N,x,F]),r().createElement("div",{className:c(Bn,{[Hn]:y})},r().createElement("div",{className:Dn},w&&r().createElement(An,n()({},Un,{className:Vn,inputType:"text",id:"search-box-autocomplete-input-"+u,dataTestId:"search-box-autocomplete-input",isDisabled:!0,readOnly:!0,value:w})),r().createElement(An,n()({},Un,{className:c(Yn,T(_.input)),inputType:"search",ariaAttributes:{label:b},id:"search-box-input-"+u,dataTestId:"search-box-input",isDisabled:h,maxLength:100,onBlur:m,onClick:f,onDblClick:E,onFocus:I,onInput:e=>{M(e)},onValueChange:A,onKeyPress:e=>{O(e),null==L||L(e)},placeholder:b,readOnly:h,ref:d,value:v,name:"q"}))),y&&r().createElement(Pn,{onClick:s,label:a,clearButtonText:S}))};var jn="TmqMif";const qn=()=>i.createElement("div",{className:c(jn,T(_.icon))},i.createElement(Rt,null));var zn="aXOBOn",Zn="KsMOVs",Wn="ipSfdV",Jn="lS0Z88";const Xn=e=>{let{autocompleteValue:t,changeValue:n,clearButtonLabel:o,clearValue:a,id:s,inputRef:l,isDisabled:u,onAutocomplete:d,onBlur:h,onChange:g,onClick:p,onDblClick:f,onFocus:E,onKeyPress:T,placeholder:_,clearButtonText:I,searchButtonLabel:L,value:b,isModalSuggestionsShown:v}=e;const C=(0,i.useRef)(null);return r().createElement("div",{className:zn,ref:C},r().createElement("div",{className:Zn}),r().createElement("div",{className:Wn,"data-testid":"search-icon"},r().createElement(qn,null)),r().createElement($n,{containerRef:C,clearButtonLabel:o,isDisabled:u,id:s,inputRef:l,onBlur:h,clearValue:a,onClick:p,onDblClick:f,onFocus:E,onChange:g,onKeyPress:T,onAutocomplete:d,placeholder:_,autocompleteValue:t,changeValue:n,value:b,isModalSuggestionsShown:v,clearButtonText:I}),r().createElement("button",{"aria-label":L,className:c(Jn,m),onClick:e=>{e.stopPropagation()},type:"submit"},r().createElement(qn,null)))};var Kn="wdVIxK",Qn="yu5tzD",ei="shCc15",ti="Btc0MU";const ni=e=>{let{autocompleteValue:t,changeValue:n,clearButtonLabel:i,clearValue:o,dataTestId:a,expandedDesktopSuggestions:s,handleKeyDown:l,handleSubmit:u,id:d,inputRef:h,isDisabled:g,onAutocomplete:m,onBlur:p,onChange:f,onClick:E,onDblClick:T,onFocus:_,onKeyPress:I,placeholder:L,clearButtonText:b,defaultFormAction:v,value:C,isModalSuggestionsShown:S}=e;return r().createElement("form",{className:c(Kn,{[ti]:!!s,[Qn]:!!t}),"data-testid":a,onSubmit:u,role:"search",action:v,onClick:()=>{var e;return null==(e=h.current)?void 0:e.focus()},onKeyDown:l},r().createElement(Xn,{clearButtonLabel:i,isDisabled:g,id:d,inputRef:h,onBlur:p,clearValue:o,onClick:E,onDblClick:T,onFocus:_,onChange:f,onKeyPress:I,onAutocomplete:m,placeholder:L,clearButtonText:b,searchButtonLabel:L,changeValue:n,autocompleteValue:t,value:C,isModalSuggestionsShown:S}),r().createElement("input",{className:ei,type:"submit",tabIndex:-1,"aria-hidden":"true",value:L}))};var ii="QdV_oU",oi="btVOrl",ai="HRqysE";function ri(e){let{searchButtonLabel:t,onFocus:n}=e;return r().createElement("button",{"aria-label":t,className:c(ai,m),onFocus:n,onClick:e=>{e.stopPropagation()}},r().createElement(qn,null))}const si=(e,t)=>{const{autocompleteEnabled:o,changeValue:a,clearSuggestions:s,closeParentContainer:g=!1,closeSuggestions:m,direction:p,id:E,className:I,customClassNames:L=[],isDisabled:b=!1,isSuggestionsOpen:v=!1,onAutocomplete:C,onBlur:S,onChange:y,onClear:A,onClick:w,onDblClick:O,onFocus:M,onKeyPress:R,onModalSuggestionsClose:N,onModalSuggestionsOpen:F,onMouseEnter:x,onMouseLeave:k,onSubmit:G,onSuggestionsFooterClick:P,placeholder:B="",clearButtonText:H,suggestions:V,suggestionsEnabled:D=!1,suggestionsLoading:Y=!1,translations:U,useModalSuggestions:$,defaultFormAction:j,value:q="",layout:z,scopedClassName:Z}=e,W=o&&e.autocompleteValue||"",[J,X]=(0,i.useState)(!1);(0,i.useImperativeHandle)(t,(()=>({focus:()=>{var e;null==(e=K.current)||e.focus()},blur:()=>{var e;null==(e=K.current)||e.blur()}})));const K=(0,i.useRef)(null),Q=(0,i.useRef)(null),ee=(0,i.useRef)(null),{shouldShowSuggestions:te,resetSuggestionsVisibility:ne}=(e=>{let{isSuggestionsOpen:t,parentRef:n,suggestions:o,suggestionsEnabled:a,useModalSuggestions:r}=e;const[s,c]=(0,i.useState)(!0),l=(0,i.useCallback)((()=>{c(!0)}),[]);(0,i.useEffect)(l,[a,t,l]);const u=(0,i.useCallback)((()=>{c(!1)}),[]);return zt("focus",[n],u),zt("click",[n],u),{shouldShowSuggestions:Boolean(a&&t&&(r||s&&o)),resetSuggestionsVisibility:l}})({isSuggestionsOpen:v,parentRef:ee,suggestions:V,suggestionsEnabled:D,useModalSuggestions:$});(0,i.useEffect)((()=>{if($)return te?null==F||F():null==N||N({closeParentContainer:g}),()=>{null==N||N({closeParentContainer:g})}}),[te,$]);const{activeOptionIndex:ie,moveDown:oe,moveUp:ae,navigate:re,scrollIntoRef:se,suggestionsWithNavigation:ce}=qt(e,te),le=()=>{q&&(a(""),s(),null==y||y({type:"change",compId:E,previousValue:q}),null==A||A({type:"clear",compId:E,previousValue:q}))},ue=Boolean(te&&ce),de=ue&&$,he=ce.items.filter((e=>{let{type:t}=e;return"item"===t})).length,ge=he>0?U.numberOfSuggestionsEntries.replace(/{{amount}}/g,""+he):void 0,me={autocompleteValue:W,changeValue:a,clearButtonLabel:U.clearButtonText,clearValue:le,handleKeyDown:e=>{if(e.keyCode===u&&(ue&&!de?m():de?(m(),le()):le(),e.preventDefault()),te){const t={[d]:ae,[h]:oe,[l]:-1!==ie?re:void 0}[e.keyCode];t&&(t(),e.preventDefault())}},handleSubmit:e=>{var t;e.preventDefault(),null==(t=K.current)||t.blur(),null==G||G({type:"submit",compId:E})},id:E,isDisabled:b,onAutocomplete:C,onChange:y,onClick:w,onDblClick:O,onKeyPress:R,placeholder:B,clearButtonText:H,defaultFormAction:j,value:q,isModalSuggestionsShown:de},pe="icon-only"===z;return r().createElement("div",n()({id:E},f(e),{dir:p,ref:ee,className:c(oi,{[ii]:te,"search-box-component-focus-ring-visible":J},I,T(_.root,...L)),onMouseEnter:x,onMouseLeave:k,"aria-live":"polite","aria-label":ge,"data-testid":"search-box-container",tabIndex:-1}),de&&r().createElement(dn,{id:E,closeSuggestions:m,clearValue:le,inputRef:Q,onSuggestionsFooterClick:P,query:q,scrollIntoRef:se,suggestions:ce,suggestionsLoading:Y,translations:U,direction:p,scopedClassName:Z},r().createElement(ni,n()({},me,{dataTestId:"modal-suggestions-search-box-form",inputRef:Q}))),pe?r().createElement(ri,{searchButtonLabel:B,onFocus:M}):r().createElement(jt,{id:E,parentRef:ee,useModalSuggestions:$,isSuggestionsShown:ue&&!de,onSuggestionsFooterClick:P,query:q,scrollIntoRef:se,suggestions:ce,translations:U},r().createElement(ni,n()({},me,{dataTestId:"search-box-form",expandedDesktopSuggestions:te,inputRef:K,onBlur:e=>{null==S||S(e),X(!1)},onFocus:e=>{null==M||M(e),X(!0),ne()}}))))};const ci=e=>e.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`));var li;const ui={SearchBox:{component:r().forwardRef(si),controller:(li=e=>{let{mapperProps:t,controllerUtils:n,stateValues:i}=e;const{compId:o,isMobileView:a,...r}=t,{isScrollingBlocked:s,setSiteScrollingBlocked:c,enableCyclicTabbing:l,disableCyclicTabbing:u,getMenuContainerApiByChildId:d,scopedClassName:h}=i,g={...r,closeSuggestions(){n.updateProps({isSuggestionsOpen:!1,closeParentContainer:!1,suggestionsLoading:!1})},clearSuggestions(){n.updateProps({suggestions:null})},changeValue(e){n.updateProps({value:e})}};return a?{...g,onModalSuggestionsOpen:()=>{s||c(!0,o),l(o)},onModalSuggestionsClose:function(e){let{closeParentContainer:t=!1}=void 0===e?{}:e;if(s&&c(!1,o),t){const e=null==d?void 0:d(o);null==e||e.close(!0)}u(o)},scopedClassName:h}:g},{useComponentProps:(e,t,n)=>{const i=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,[t,n])=>{return{...e,[(i=t,i.startsWith("--")?t:ci(t))]:void 0===n?null:n};var i}),{});e.updateStyles(n)}}))(n);return li({mapperProps:e,stateValues:t,controllerUtils:i})}})}}}(),a}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[SearchBox].0c8d276a.bundle.min.js.map